home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / winter_challenge.swf / scripts / frame_8 / PlaceObject2_102_98 / CLIPACTIONRECORD onClipEvent(load).as < prev   
Text File  |  2011-08-19  |  879b  |  27 lines

  1. onClipEvent(load){
  2.    function getPoints()
  3.    {
  4.       point = new object();
  5.       point.x = _root.ATVclip.ATV._x;
  6.       point.y = _root.ATVclip.ATV._y;
  7.       _root.ATVclip.ATV.localToGlobal(point);
  8.    }
  9.    function doSmoke(thisTire)
  10.    {
  11.       getPoints();
  12.       duplicateMovieClip(_root.originalsmoke,"smoke" + smokeOnstage,16384 + (8520 + smokeOnstage));
  13.       thisSmoke = eval("_root.smoke" + smokeOnstage);
  14.       thisSmoke._x = point.x + int(random(5) + 2) * (1 - random(2) * 2);
  15.       thisSmoke._y = point.y + int(random(5) + 2) * (1 - random(2) * 2);
  16.       maxHitpoints = 75;
  17.       currentHitpoints = _root.hitpoints;
  18.       newAlpha = Math.abs(currentHitpoints / maxHitpoints) * 100;
  19.       newAlpha = 100 - newAlpha;
  20.       thisSmoke._alpha = newAlpha;
  21.       thisSmoke.play();
  22.       smokeOnstage++;
  23.    }
  24.    maxSmokes = 30;
  25.    smokeOnstage = 100;
  26. }
  27.